﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.ServiceModel;
using Ks.FileStreaming;

namespace FsHost
{
    public partial class Form1 : Form
    {
        ServiceHost Host;
        public Form1()
        {
            InitializeComponent();
        }

        private void btnStartFS_Click(object sender, EventArgs e)
        {
            Host = new ServiceHost(typeof(StreamingService));
            Host.Open();
            this.lblStatus.Text = "Server Running !";
        }
        

        private void button1_Click_1(object sender, EventArgs e)
        {
            Host.Close();
            this.lblStatus.Text = "Server Stopped !";
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            //Host = new ServiceHost(typeof(StreamingService));
            //Host.Open();
            //this.lblStatus.Text = "Server Running !";
        }
    }
}
